// Arup Guha
// 1/7/2010
// Similar to the Point class from Cohoon&Davidson
public class Point {
	
	protected int x;
	protected int y;
	
	public Point() {
		System.out.println("Default Point Constructor");
		x = 0;
		y = 0;
	}
	
	public Point(int a, int b) {
		System.out.println("Regular Point Constructor");
		x = a;
		y = b;
	}
	
	public void translate(int dx, int dy) {
		System.out.println("Point translate");
		x += dx;
		y += dy;
	}
	
	public String toString() {
		return getClass() + "["  + x + "," + y + "]";
	}
	
	public boolean equals(Object v) {
		//System.out.println("Point equals");
		if (v instanceof Point) {
			Point p = (Point)v;
			return p.x == x && p.y == y;
		}
		
		return false;
	}
	
	public Object clone() {
		return new Point(x,y);
	}
}